package cn.calm.cxf.restful.service;

public class RoomServiceImpl implements RoomService {

	public Room root(String id) {
		System.out.println("get room by id= " + id);
		Room room = RoomDAO.getRoom(id);
		return room;
	}

	public void addRoom(Room room) {
		System.out.println("add room which id is:" + room.getId());
		RoomDAO.addRoom(room);
	}

	public void updateRoom(String id, Room room) {
		System.out.println("update room which original id is:" + room.getId());
		RoomDAO.updateRoom(id, room);
	}

	public void deleteRoom(String id) {
		System.out.println("remove room by id= " + id);
		RoomDAO.deleteRoom(id);
	}

	public void addPerson(String id, Person person) {
		System.out.println("add person who's name is:" + person.getName());
		RoomDAO.addPerson(id, person);
	}

	public void deletePerson(String id, String name) {
		System.out.println("remove person who's name is: " + name);
		RoomDAO.deletePerson(id, name);
	}
}